package com.nineclock.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nineclock.system.pojo.SysFunction;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SysFunctionMapper extends BaseMapper<SysFunction> {

    @Select("SELECT f.* FROM sys_function f LEFT JOIN  sys_role_function rf ON f.id = rf.function_id WHERE rf.role_id=#{roleId}")
    List<SysFunction> queryFunctionByRoleId(Long roleId);

}

